package com.city.repository.city;

import com.city.domain.city.CityCopnotePerson;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @deprecation: 民情日记被访人员记录
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
public interface CityCopnotePersonRepository extends JpaRepository<CityCopnotePerson,Integer> {

    @Query(value = "select * from city_copnote_person where copnote_id=?1", nativeQuery = true)
    List<CityCopnotePerson> getTime(String time);

    //通过上报id查询
    @Query(value = "select * from city_copnote_person where copnote_id=?1",nativeQuery = true)
    CityCopnotePerson findByCopnoteId(int id);

    @Query(value = "SELECT * from city_copnote_person where copnote_id=?1",nativeQuery = true)
    List<CityCopnotePerson> findAllById(Integer id);
}
